<page-header [autoTitle]="false" *ngIf="!brandId"></page-header>
<nz-card [nzBordered]="!brandId">
  <section class="search-section">
    <input nz-input placeholder="修改人名称" [(ngModel)]="keyword" class="search-item"/>
    <button nz-button [nzType]="'primary'" nzGhost (click)="search()" class="search-item">
      <i class="anticon anticon-search"></i><span>搜索</span>
    </button>
    <!--<button nz-button [nzType]="'primary'" (click)="editEntity({})" class="search-add-right">-->
    <!--<i class="anticon anticon-plus"></i><span>添加</span>-->
    <!--</button>-->
  </section>
  <nz-table #nzTable [nzData]="page.content"
            [nzPageSize]="page.size"
            [nzTotal]="page.totalElements"
            [nzFrontPagination]="false"
            [(nzPageIndex)]="page.number"
            (nzPageIndexChange)="changePageNo($event)"
            [nzLoading]="isLoading">
    <thead>
    <tr>
      <th><span>序号</span></th>
      <th><span>品牌名称</span></th>
      <th *ngIf="shopId"><span>店铺名称</span></th>
      <th><span>修改人</span></th>
      <th><span>修改时间</span></th>
      <th><span>操作</span></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of nzTable.data;let i=index">
      <td>
        {{i+1}}
      </td>
      <td>{{data.brand.name}}</td>
      <td *ngIf="shopId">{{data.shop.title}}</td>
      <td><span *ngIf="data.customers">{{data.customers.name}}</span><span *ngIf="!data.customers">平台</span></td>
      <td>{{data.saveDate}}</td>
      <td>
        <a href="javascript:void (0);" (click)="editEntity(data)">查看详情</a>
      </td>
    </tr>
    </tbody>
  </nz-table>
</nz-card>
